Integrand size = 40, antiderivative size = 127 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\frac {2 B \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{3/2} d}-\frac {(5 B-C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(B-C) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}} \]
[Out]
Time = 0.33 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {4157, 4007, 4005, 3859, 209, 3880} \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=-\frac {(5 B-C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {2 B \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{a^{3/2} d}-\frac {(B-C) \tan (c+d x)}{2 d (a \sec (c+d x)+a)^{3/2}} \]
[In]
[Out]
Rule 209
Rule 3859
Rule 3880
Rule 4005
Rule 4007
Rule 4157
Rubi steps \begin{align*} \text {integral}& = \int \frac {B+C \sec (c+d x)}{(a+a \sec (c+d x))^{3/2}} \, dx \\ & = -\frac {(B-C) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {\int \frac {-2 a B+\frac {1}{2} a (B-C) \sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{2 a^2} \\ & = -\frac {(B-C) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac {B \int \sqrt {a+a \sec (c+d x)} \, dx}{a^2}-\frac {(5 B-C) \int \frac {\sec (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx}{4 a} \\ & = -\frac {(B-C) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac {(2 B) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a d}+\frac {(5 B-C) \text {Subst}\left (\int \frac {1}{2 a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{2 a d} \\ & = \frac {2 B \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a^{3/2} d}-\frac {(5 B-C) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(B-C) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}} \\ \end{align*}
Time = 4.15 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.16 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\frac {\csc (c+d x) \left (8 B \arctan \left (\sqrt {-1+\sec (c+d x)}\right ) \cos ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {-1+\sec (c+d x)}-\sqrt {2} (5 B-C) \arctan \left (\frac {\sqrt {-1+\sec (c+d x)}}{\sqrt {2}}\right ) \cos ^2\left (\frac {1}{2} (c+d x)\right ) \sqrt {-1+\sec (c+d x)}+2 (-B+C) \sin ^2\left (\frac {1}{2} (c+d x)\right )\right )}{2 a d \sqrt {a (1+\sec (c+d x))}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(288\) vs. \(2(106)=212\).
Time = 0.50 (sec) , antiderivative size = 289, normalized size of antiderivative = 2.28
method | result | size |
default | \(-\frac {\sqrt {-\frac {2 a}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\, \left (-4 B \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {2}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\right )-B \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )+C \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )+5 B \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right )-C \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right )\right )}{4 a^{2} d}\) | \(289\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 231 vs. \(2 (106) = 212\).
Time = 1.80 (sec) , antiderivative size = 548, normalized size of antiderivative = 4.31 \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\left [-\frac {4 \, {\left (B - C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - \sqrt {2} {\left ({\left (5 \, B - C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (5 \, B - C\right )} \cos \left (d x + c\right ) + 5 \, B - C\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right )^{2} + 2 \, a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 8 \, {\left (B \cos \left (d x + c\right )^{2} + 2 \, B \cos \left (d x + c\right ) + B\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} + 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right )}{8 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}}, -\frac {2 \, {\left (B - C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - \sqrt {2} {\left ({\left (5 \, B - C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (5 \, B - C\right )} \cos \left (d x + c\right ) + 5 \, B - C\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) + 8 \, {\left (B \cos \left (d x + c\right )^{2} + 2 \, B \cos \left (d x + c\right ) + B\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{4 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}}{\left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]
[In]
[Out]
\[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} \cos \left (d x + c\right )}{{\left (a \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
[In]
[Out]
Exception generated. \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {\cos (c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^{3/2}} \, dx=\int \frac {\cos \left (c+d\,x\right )\,\left (\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]
[In]
[Out]